<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
     <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/themes/icon.css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript"  src="${pageContext.request.contextPath}/easyui/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/common.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>出库统计报表页面</title>
<script type="text/javascript">

//通过产品名称搜索
function searchOutputStock(){
	$("#dg").datagrid('load',{
		"outputStockID":$("#s_outputstockID").val(),
		"outputStockType":$("#s_outputType").combobox("getValue"),
		"createTimefrom":$("#s_createTimefrom").datebox("getValue"),
		"createTimeto":$("#s_createTimeto").datebox("getValue")
	
	});
}
//刷新
function refresh() {
	$("#dg").datagrid("load", {//使用load方法
		data : "customerName"//传到后台的变量
	});
}
   //重置
function reset(){
	$("#s_outputstockID").val("");
	$("#s_outputType").combobox("setValue","");
	
	$("#s_createTimefrom").datebox("setValue","");
	$("#s_createTimeto").datebox("setValue","");

}
 //关闭时将所有值置为空 
function resetValue(){
	$("#id1").val("");
	$("#id2").val("");
	$("#id3").val("");
	$("#id4").val("");
	$("#type1").combobox("setValue","");
	$("#time3").datebox("setValue","");
	$("#time4").datebox("setValue","");
	
	$("#number").val("");
	$("#name").val("");
	$("#tag1").val("");
	$("#price").val("");
	
}

function closeOutputStockDialog(){
	$("#dlg").dialog("close");
	resetValue();
}

//格式化供应商
function formatProduct(val,row) {
    return val.productName;
}
function formatWareHouse(val,row) {
    return val.wareHouseName;
}
function formatCustomer(val,row) {
    return val.customerName;
}
</script>
</head>
<body style="margin:1px;">
          <!-- 查询出库信息 -->
	<table id="dg" title="出库信息管理" class="easyui-datagrid"
	  pagination="true" rownumbers="true"  fit="true"
	    url="${pageContext.request.contextPath}/outputstocklist.do"  toolbar="#tb">
		 <thead data-options="frozen:true">
				<tr>
					<th field="cb" checkbox="true" align="center"></th>
			 		<th field="outputStockID" width="118" align="center">出库编号</th>
			 		
			 		<th field="product" width="116" align="center" formatter="formatProduct">产品名称</th>
			 		<th field="wareHouse" width="116" align="center" formatter="formatWareHouse">仓库名称</th>
			 		<th field="customer" width="116" align="center" formatter="formatCustomer">客户名称</th>
			 		<th field="outputprice" width="118" align="center">出库产品单价</th>
			 		<th field="outputStockNum" width="118" align="center">出库产品数量</th>
			 		<th field="outputStockType" width="118" align="center">出库类型</th>
			 		<th field="handlePeople" width="118" align="center">经办人</th>
			 		<th field="outputStocktag" width="118" align="center">出库标记</th>
			 		<th field="outputStocktime" width="118" align="center">出库日期</th>
				</tr>
			</thead>
	</table>
		
	<div id="tb">
		
			&nbsp;出库编号：&nbsp;<input type="text" id="s_outputstockID" size="20" onkeydown="if(event.keyCode==13) searchOutputStock()"/>
			
			&nbsp;出库日期：&nbsp;<input class="easyui-datebox" id="s_createTimefrom" style="width:154px;" onkeydown="if(event.keyCode==13) searchOutputStock()">-<input class="easyui-datebox" id="s_createTimeto" style="width:154px;" onkeydown="if(event.keyCode==13) searchOutputStock()">
			
			
			<select class="easyui-combobox" id="s_outputType"  style="width: 154px;" editable="false" panelHeight="auto" onkeydown="if(event.keyCode==13) searchOutputStock()">
			                <option value="">请选择出库类型...</option>
	 						<option value="销售出库">销售出库</option>
	 						<option value="退货出库">退货出库</option>
	 						<option value="用料出库">用料出库</option>	 						
	 						</select>
	 						
	 						
	 						
	 						
          <a href="javascript:searchOutputStock()" class="easyui-linkbutton" iconCls="icon-search" plain="true">搜索</a>
          <a href="javascript:reset()" class="easyui-linkbutton" iconCls="icon-redo" plain="true">重置</a>
           <a id="refreshbtn"
				href="javascript:refresh()" class="easyui-linkbutton"
				iconCls="icon-reload" plain="true">刷新</a>
			 <a href="${pageContext.request.contextPath }/excel/outputStockStatement.do" class="easyui-linkbutton" data-options="iconCls:'icon-print'" plain="true">导出excel</a>
				
		</div>
		

</body>
</html>